package com.sh.tgtools.view;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;


import com.sh.tgtools.R;
import com.sh.tgtools.utils.StatusBarUtils;
import com.sh.tgtools.utils.lizi.ExplosionField;
import com.sh.tgtools.utils.lizi.FallingParticleFactory;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import de.hdodenhof.circleimageview.CircleImageView;

public class StatusBarActivity extends AppCompatActivity {

    @BindView(R.id.common_back)
    ImageView mCommonBack;
    @BindView(R.id.common_tv)
    TextView mCommonTv;
    @BindView(R.id.common_tv_right)
    TextView mCommonTvRight;
    @BindView(R.id.iv_message)
    ImageView mIvMessage;
    @BindView(R.id.common_rl)
    RelativeLayout mCommonRl;
    @BindView(R.id.v_title_line)
    View mVTitleLine;
    @BindView(R.id.iv_test_img)
    CircleImageView mIvTestImg;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_status_bar);
        ButterKnife.bind(this);
        StatusBarUtils.setColor(this, getResources().getColor(R.color.colorWhite));
        StatusBarUtils.setTextDark(this, StatusBarUtils.isDarkColor(getResources().getColor(R.color.colorWhite)));
        ExplosionField explosionField = new ExplosionField(this,new FallingParticleFactory());
        explosionField.addListener(mIvTestImg);
    }

    @OnClick({R.id.common_back, R.id.iv_message})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.common_back:
                finish();
                break;
            case R.id.iv_message:
                break;
        }
    }
}
